home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / shotgun.tik < prev    next >
Encoding:
Text File  |  2002-11-01  |  8.4 KB  |  338 lines

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  6.     path models/weapons/shotgun
  7.     skelmodel shotgun.skd
  8.     surface shotgun shader shotgun
  9. }
  10.  
  11. init
  12. {
  13.     server
  14.     {
  15.  
  16.     //========================================//
  17.     //        WEAPON NAME          //
  18.     //========================================//
  19.  
  20.         classname        Weapon
  21.         weapontype        heavy
  22.         weaponsubtype        2
  23.         name            "Shotgun"
  24.         rank            620 620
  25.  
  26.     //========================================//
  27.     //        WEAPON ACCURACY       //
  28.     //========================================//
  29.  
  30. //        Winchester Shotgun: Max Eff. Range is 25 yds with a muzzle velocity of X ft/s. (Double Ought Buckshot)
  31.  
  32.         sp bulletrange        1000             //the range at which bulletspread is applied
  33.         sp bulletspread        80 80 95 95     //minpitch minyaw maxpitch maxyaw
  34.  
  35.         dm bulletrange        1000
  36.         dm bulletspread        80 80 95 95
  37.  
  38.         realism bulletrange        1000
  39.         realism bulletspread        80 80 95 95
  40.  
  41.     //========================================//
  42.     //        DAMAGE / RATE OF FIRE      //
  43.     //========================================//
  44.  
  45.         // currently does a total 300 potential damage, but uses more pellets in SP
  46.         sp bulletcount        30
  47.         sp bulletdamage        10
  48.  
  49.         dm bulletcount        20
  50.         dm bulletdamage        14    //was 15
  51.  
  52.         realism bulletcount        20
  53.         realism bulletdamage        17    //was 15
  54.  
  55.         sp firedelay        0.75
  56.         dm firedelay        0.75
  57.         realism firedelay        0.75
  58.  
  59.     //========================================//
  60.     //        PLAYER MOVEMENT          //
  61.     //========================================//
  62.  
  63.         sp movementspeed    0.99
  64.         dm movementspeed     0.99
  65.         realism movementspeed     0.99
  66.  
  67.     //========================================//
  68.     //        RIFLE BUTT / SECONDARY FIRE//
  69.     //========================================//
  70.  
  71.         secondary firetype        melee
  72.         secondary ammotype        none
  73.         secondary ammorequired        0
  74.         secondary meansofdeath        bash
  75.         secondary bulletknockback    50
  76.         secondary quiet
  77.  
  78.         sp secondary bulletrange    64
  79.         sp secondary bulletdamage    60
  80.  
  81.         dm secondary bulletrange    96
  82.         dm secondary bulletdamage    60
  83.  
  84.         realism secondary bulletrange    96
  85.         realism secondary bulletdamage    60
  86.  
  87.     //========================================//
  88.     //        AMMO              //
  89.     //========================================//
  90.  
  91.         firetype        bullet
  92.         ammotype        "shotgun"
  93.         meansofdeath    shotgun
  94.         semiauto
  95.         clipsize        5
  96.         ammorequired    1
  97.  
  98.         sp startammo    5
  99.         dm startammo    60
  100.         sprealism startammo    5
  101.         dmrealism startammo    45
  102.  
  103.         // Additional DM Loadout
  104.         dm additionalstartammo "grenade" 2
  105.         dm additionalstartammo "smokegrenade" 1
  106. //        dm startitem "items/binoculars.tik"
  107.  
  108.         // Additional DM Realism Loadout
  109.         dmrealism additionalstartammo "grenade" 2
  110.         dmrealism additionalstartammo "smokegrenade" 1
  111. //        dmrealism startitem "items/binoculars.tik"
  112.  
  113.     //========================================//
  114.     //        CROSSHAIR, ZOOM, TRACERS  //
  115.     //========================================//
  116.  
  117.         tracerfrequency 0
  118.  
  119.         crosshair        1
  120.  
  121.     //========================================//
  122.     //        SOUND, AI, OTHER      //
  123.     //========================================//
  124.  
  125.  
  126.         pickupsound        shotgun_snd_pickup
  127.         ammopickupsound    shotgun_snd_pickup_ammo
  128.         noammosound        shotgun_snd_noammo
  129.  
  130.         // Holstering info
  131. //        holstertag        "Bip01 Spine2"
  132. //        holsteroffset    "8.0 -7.75 6.5"
  133. //        holsterangles    "0 185 -25"
  134. //        holsterScale    1.0
  135.  
  136.         // AI animation group info
  137.         weapongroup        rifle    //TODO: If AI use this weapon, we need a shotgun group.
  138.         airange            short
  139.  
  140.     }
  141.     client
  142.     {
  143.         cache tracer.spr
  144.         cache muzsprite.spr
  145.         cache models/ammo/shotgunshell.tik
  146.         cache model models/fx/bh_metal_fastpiece.tik
  147.     }
  148. }
  149.  
  150. animations
  151. {
  152.     idle    shotgun.skc
  153.     reload     shotgun.skc // this is the start of the reloading sequence
  154.     {
  155.         client
  156.         {
  157.             entry sound shotgun_snd_reload_start
  158.         }
  159.  
  160.     }
  161.     reload_single shotgun.skc // this is the reload loop that loads in a single shell
  162.     {
  163.         client
  164.         {
  165.             entry stopaliaschannel shotgun_snd_reload_single
  166.             entry sound shotgun_snd_reload_single
  167.         }
  168.     }
  169.     reload_end shotgun_fire.skc
  170.     {
  171.         server
  172.         {
  173.             last idle
  174.         }
  175.         client
  176.         {
  177.             entry sound shotgun_snd_reload_end
  178.         }
  179.     }
  180.     secondaryfire     shotgun.skc
  181.     {
  182.         server
  183.         {
  184.             entry shoot secondary
  185.         }
  186.     }
  187.     fire    shotgun_fire.skc
  188.     {
  189.         server
  190.         {
  191.             entry shoot
  192.         }
  193.         client
  194.         {
  195.             entry stopaliaschannel shotgun_snd_fire
  196.             entry sound shotgun_snd_fire
  197.  
  198.             // this is the sound for the rechambering pump
  199.             entry stopaliaschannel shotgun_snd_rechamber
  200.             entry sound shotgun_snd_rechamber
  201.  
  202.             // By now, the server has already fired the weapon, so it's
  203.             // ok to apply the view kick apon entry to avoid problems
  204.             // with multiple application on single frame animations.
  205.  
  206.             ////////////////////////////////////////////////////////////////////////////////////////
  207.             // View Kicking
  208.             //
  209.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  210.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  211.             // will be explained.
  212.             // Scatter Patterns:
  213.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  214.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  215.             //
  216.             //
  217.             //                     +-------------------------------------------- Scatter Pitch Min
  218.             //                      |    +--------------------------------------- Scatter Pitch Max
  219.             //                      |    |       +------------------------------- Scatter Yaw Min
  220.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  221.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  222.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  223.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  224.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  225.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  226.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  227.             //                      |    |       |   |     |    |     |  | |      purely random.
  228.             //                V    V       V   V     V    V     V  V V
  229.             entry viewkick         -20.0 -20.0    0.05 0.05 15.2  "T"   12.0 5.0 10.0
  230.  
  231. //            entry viewkick         -1.2 -1.2    -0.2  0.2   1   "V"   3.0 1.0 1.6 (Colt .45 Pistol)
  232.  
  233.  
  234. //            entry viewkick -3 -3.5   -0.75 -1.0 (old)
  235.  
  236.             // muzzle flash
  237.             entry tagdlight tag_barrel 0.25 0.2 0.15 140 0.11
  238.             entry tagspawnlinked tag_barrel
  239.             (
  240.                 scale 0.4
  241.                 offsetalongaxis 1.5 0 0
  242.                 count 1
  243.                 model muzsprite.spr
  244.                 angles 0 0 crandom 25
  245.                 life 0.06
  246.             )
  247.  
  248.             entry tagspawn tag_barrel
  249.             (
  250.                 spawnrate 1.00
  251.                 model models/fx/bh_metal_fastpiece.tik
  252.                 count 2
  253.                 color 1.00 1.00 1.00
  254.                 scale 0.20
  255.                 life 0.30
  256.                 radius 3.00
  257.                 velocity 100.00
  258.                 randvel 100 0 0
  259.                 accel 0.00 0.00 -120.00
  260.                 offsetalongaxis 4 0 0
  261.                 fade
  262.                 align
  263.             )
  264.  
  265.             entry tagspawnlinked tag_barrel
  266.             (
  267.                 spawnrate 1.00
  268.                 model muzsprite.spr
  269.                 color 1.00 1.00 1.00
  270.                 scale 0.60
  271.                 life 0.09
  272.                 scalerate 12.00
  273.                 velocity 33.00
  274.                 offsetalongaxis 4 0 0
  275.                 fade
  276.                 randomroll
  277.             )
  278.  
  279.             entry tagspawnlinked tag_barrel
  280.             (
  281.                 spawnrate 1.00
  282.                 model muzsprite.spr
  283.                 color 1.00 1.00 1.00
  284.                 scale 0.60
  285.                 life 0.10
  286.                 scalerate 3.00
  287.                 velocity 40.00
  288.                 offsetalongaxis 5 0 0
  289.                 randomroll
  290.             )
  291.  
  292.             entry commanddelay 0.010 originspawn
  293.             (
  294.                 model vsssource.spr
  295.                 count 5
  296.                 alpha 0.30
  297.                 color 1.00 1.00 1.00
  298.                 spritegridlighting
  299.                 scale 0.70
  300.                 life 0.50
  301.                 scalerate 6.00
  302.                 cone 6.00 2.00
  303.                 velocity 320.00
  304.                 radialvelocity 11.00 60.00 120.00
  305.                 accel 0.00 0.00 -30.00
  306.                 friction 5.00
  307.                 offset crandom -5 crandom -5 crandom -5
  308.                 offsetalongaxis 30 0 0
  309.                 fade
  310.                 randomroll
  311.             )
  312.  
  313.             // shell eject
  314.             entry commanddelay 0.2 tagspawn tag_eject
  315.             (
  316.                 count 1
  317.                 model models/ammo/shotgunshell.tik
  318.                 spawnrange 1024
  319.                 scale 1.0
  320.                 velocity 70
  321.                 randvel crandom 10 crandom 10 random 20
  322.                 emitterangles 0 0 0
  323.                 avelocity crandom 90 crandom 90 0
  324.                 accel 0 0 -800
  325.                 physicsrate 20
  326.                 life 2.0
  327.                 fadedelay 1.7
  328.                 collision
  329.                 bouncefactor 0.2
  330.                 bouncesoundonce snd_shotgun_shell
  331.             )
  332.         }
  333.     }
  334. }
  335.  
  336. /*QUAKED addon_playerweapon_allied_shotgun (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  337. Weapon - Winchester Model 12 Shotgun
  338. */